// set directory to source directory

// This file generates the predicted probabilities used in figure 4
clear
version 15.1 



// 4(i)
insheet using "../../../Studies 2a(i), 2b(i), 3(i)/data/cleaned/heuristics_4a.csv", clear

areg mcratingscale i.mc_republican##c.pid i.sig_signal_matches_voter_vote_sh#i.sig_rating_supportive_vote_sh, a(sameprobfes)

margins i.sig_signal_matches_voter_vote_sh#i.sig_rating_supportive_vote_sh


// 4(ii)
insheet using "../../data/cleaned/heuristics_4b.csv", clear

areg mcratingscale i.sig_signal_matches_voter_vote_sh#i.sig_rating_supportive_vote_sh control_*, a(sameprobfes)

margins i.sig_signal_matches_voter_vote_sh#i.sig_rating_supportive_vote_sh


// The predicted probabilities generated in the two margin commands are manually saved to
// Studies 2a(ii), 2b(ii), 3(ii)\data\cleaned\fig4data.csv
